﻿using Microsoft.AspNetCore.Mvc;
using System;
using System.Threading;
using System.Threading.Tasks;

namespace ElasticB.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class DataSourceController : ControllerBase
    {
        [HttpGet("b")]
        public async Task<string> B()
        {
            Thread.Sleep(new Random().Next(1, 1500));

            return "B";
        }

        [HttpGet("c")]
        public async Task<string> C()
        {
            Thread.Sleep(new Random().Next(1, 1500));

            return "C";
        }

        [HttpGet("d")]
        public async Task<string> D()
        { 
            Thread.Sleep(new Random().Next(1, 1500));

            return "D";
        }

        [HttpGet("e")]
        public async Task<string> E()
        {
            Thread.Sleep(new Random().Next(1, 1500));

            return "E";
        }
    }
}